<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import GlobalHeader from './views/GlobalHeader.vue'

const route = useRoute()
const showHeader = computed(() => route.path !== '/login' && route.path !== '/register')
</script>

<template>
  <div class="app">
    <global-header v-if="showHeader" />
    <div class="main-content" :class="{ 'with-header': showHeader }">
      <router-view />
    </div>
  </div>
</template>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

#app {
  height: 100%;
  width: 100%;
}

.app {
  min-height: 100vh;
}

.main-content {
  min-height: 100vh;
}

.main-content.with-header {
  padding-top: 60px;
}
</style>
